
<div class="layui-form">



    <? $case_detail=select_lines_all_items($table_Prefix."case_detail","nid desc","case_nid ='".$_REQUEST['nid']."'","") ;?>
    <? $case_quotation=select_lines_all_items($table_Prefix."quotation_detail","case_nid asc,price asc","case_nid ='".$_REQUEST['nid']."'","") ;?>




    <table class="layui-table">

        <colgroup>

            <col width="80" >
            <col   >
            <col width="100" >

            <col   >
            <col   >
            <col   >
            <col   >
            <col   >

            <col width="300" >

        </colgroup>

    <?if(count($case_detail)>0){?>
        <tr>
            <th>编号</th>
            <th>采购项</th>
            <th>采购数量</th>
            <th>企业</th>
            <th>金额</th>
            <th>申请日期</th>
            <th>备注</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
    <?}else{echo "暂无数据";}?>


    <?for($iiix=0;$iiix<count($case_detail);$iiix++){?>




        <tr id="item<?echo $case_detail[$iiix]['nid']?>" style="font-weight: bold">
            <td> <?echo $iiix+1 ?></td>
            <td> <?echo $case_detail[$iiix]['product_name']?></td>
            <td> <?echo $case_detail[$iiix]['number']?></td>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>
            <td> </td>



        </tr>

<?
        $_i=0;
        foreach ($case_quotation as $k=>$v){

    if($case_detail[$iiix]['product_nid']==$v['product_nid']){
        $_i++;
        ?>
        <tr>
            <td> </td>
            <td> </td>
            <td> </td>
            <td><?echo $v['unit_name']?></td>
            <td><?echo $v['price']?></td>
            <td><?echo $v['date']?></td>
            <td><?echo $v['remark']?></td>
            <td><?echo $v['status']?></td>
            <td>
                <a  href="choose_quotation.php?nid=<?echo $v['nid']?>" class="layui-btn" >选定</a>
            </td>
        </tr>

        <?;}?>
        <?;}?>


        <?if($_i<1){?>
        <tr style="text-align: center">
            <td colspan="9"> 暂无报价 </td>
        </tr>

        <?;}?>






        <?;}?>


</table>






</div>





